package ks.client.gui;

import ks.client.controllers.admin.ErrorOKClickController;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ErrorMessageGUI.java
 *
 * Created on Dec 15, 2009, 5:42:49 PM
 */

/**
 *
 * @author Jen_Hunt
 */
public class ErrorMessageGUI extends javax.swing.JFrame {

    /** Creates new form ErrorMessageGUI */
    public ErrorMessageGUI(String message) {
        initComponents(message);
    }


    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents(String message) {

        okButton = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        ErrorMessage = new javax.swing.JTextArea();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        okButton.setBackground(new java.awt.Color(0, 0, 0));

        jButton1.setText("OK");
        jButton1.addActionListener(new ErrorOKClickController(this));

        ErrorMessage.setBackground(new java.awt.Color(0, 0, 0));
        ErrorMessage.setColumns(20);
        ErrorMessage.setEditable(false);
        ErrorMessage.setForeground(new java.awt.Color(0, 255, 0));
        ErrorMessage.setRows(5);
        ErrorMessage.setText(message);
        jScrollPane1.setViewportView(ErrorMessage);

        javax.swing.GroupLayout okButtonLayout = new javax.swing.GroupLayout(okButton);
        okButton.setLayout(okButtonLayout);
        okButtonLayout.setHorizontalGroup(
            okButtonLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(okButtonLayout.createSequentialGroup()
                .addGroup(okButtonLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(okButtonLayout.createSequentialGroup()
                        .addGap(30, 30, 30)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(okButtonLayout.createSequentialGroup()
                        .addGap(150, 150, 150)
                        .addComponent(jButton1)))
                .addContainerGap(32, Short.MAX_VALUE))
        );
        okButtonLayout.setVerticalGroup(
            okButtonLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(okButtonLayout.createSequentialGroup()
                .addGap(28, 28, 28)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jButton1)
                .addContainerGap(20, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(okButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(okButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
}


    // Variables declaration - do not modify
    private javax.swing.JTextArea ErrorMessage;
    private javax.swing.JButton jButton1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPanel okButton;
    // End of variables declaration

}
